Ext.define("wmf.store.blacklist.query", {
    extend: "Ext.data.Store",
    model: "wmf.model.blacklist.blacklist",
	requires: [
	],
	rootVisible: true,
	pageSize:20,
    proxy: {
        type: 'ajax',
        url: 'blacklist/getBlacklist.do',
        reader: {
            type: 'json',
            root: 'list'
        }
    },
    listeners : {  
        beforeload : function(store, operation) {  
        	var page = operation.page;
       		var start = (page-1) * 20;
			if(wmf.blacklist.init == true){
        		wmf.blacklist.params.start = 0;
        		wmf.blacklist.init = false;
        	}else{
        		wmf.blacklist.params.start = start;
        	}
       		wmf.blacklist.params.limit = 20;
            var params = wmf.blacklist.params;  
            store.proxy.extraParams = {};
       		Ext.apply(store.proxy.extraParams, params);
        }  
    },
	storeId: 'blacklist.query'
});